home *** CD-ROM | disk | FTP | other *** search
- From: magicsn@birdland.es.bawue.de (Steffen Haeuser)
- Path: eisbaer.bb.bawue.de!birdland.es.bawue.de
- Newsgroups: comp.sys.amiga.programmer
- Message-ID: <72000405732631910000@BIRDLAND>
- X-Mailer: fastnet2rfc V2.0 - (tse) Lunqual%MAB@wsb.freinet.de / Tachy@wsb.freinet.de
- Organization: Birdland BBS, Dettingen/Teck, South Germany, +49-7021-862428
- Content-Type: text/plain; charset=ISO-8859-1
- Subject: rtgmaster c2p rework [2/2]
- Date: 01 Mar 1996 23:46:31
-
- 2. As soon as an application opens a RtgScreen, the c2p algorithm is loaded to memory,
- using LoadSeg() of dos.library, and the default c2p is stored in the RtgScreen
- structure. After that, a possibly existing initilaization function of the c2p will
- be called and the data it returns will be saved in the RtgScreen structure. Some
- error checks will be done (see below)
- 3. As you call CallRtgC2P, the c2p will be performed, with some error checks (see below).
- If it returns 0, everything worked, else an error happened. Some of the error checks
- will be done in CallRtgC2P, some will have to be done in your c2p code (see below).
- 4. The application waits with exec.library Wait() for the c2p to be finished, even if
- it is synchrone c2p. The application should not leave out this Wait().
- 5. If CloseRtgScreen is called, the Expunge function will be called (if it exists),
- and after that, UnloadSeg() of dos.library will be called.
-
- Certainly, Rtgmaster c2p is usable without having to use rtgmaster.library, too,
- but this is recommended. Both rtgmaster.library and the rtgmaster c2p format
- are freeware. Up to what c2p functions are, copyright is up to those who wrote
- the functions. But most of them should probably be freeware, too.
-
- ----------------------------------------------------------------------------------------------
-
- 6. Error Handling
- =================
-
- The Rtgmaster c2p format knows the following error messages. They will be
- returned by CallRtgC2P.
-
- I. c2p_err_Wrong_C2P
- II. c2p_err_Wrong_Depth
- III. c2p_warn_Wrong_Pixelmode
- IV. c2p_err_Wrong_Windowsize
- V. c2p_warn_divisible
- VI. c2p_err_hardware
- VII. c2p_err_memory
- VIII. c2p_err_internal
- IX. c2p_warn_internal
-
-
-
-
-
- I. will come up, if you, for example, try to do an interleaved-only c2p
- with a interleaved Bitmap. This will be checked by CallRtgC2P itself.
-
- II. will come up, if the Display has a depth, that is not supported
- by the c2p code. This will be checked by CallRtgC2P itself.
-
- III. will come up, if you tried to use a Pixelmode, that is not available
- for this c2p. It is only a warn, and your c2p code should use a mode, that
- finds to be a appropriate replacement. It will still do c2p, but it
- should return this warning. The c2p code should check for this, as it
- knows its possibilities and features best.
-
- IV. will come up, if you tried to do a "smaller than Fullscreen" c2p with
- a c2p that only can do Fullscreen c2p. This will be checked by CallRtgC2P
- itself. This will be done first, so a
-
- 1. Try to do "smaller than Fullscreen"
- 2. Did not work => Recalculate and do Fullscreen c2p
-
- should be optimal.
-
- V. will come up, if you tried to use illegal widths/heights for this c2p.
- You might configure the Rtgmaster Screenmode Requester c2p choosing
- utility to filter out such modes, though, so this warn will only appear,
- if you do not filter out. It will then try to do the c2p, anyways and
- wish you good luck :)
-
- VI. will be given from CallRtgC2P, if you tried to do a c2p that is not
- compatible with the given Display hardware. Processor hardware won't
- be checked, but this might be implemented in the Rtgmaster Screenmode
- Requester c2p choosing utility later.
-
- VII. is the error that you should return, if your initialization/expunge code
- fails, due to the system being low on memory.
-
- VIII./IX. is the error you should return, if something happens that is nothing
- of the other stuff. It exists as warn and as error.
-
- ---------------------------------------------------------------------------------------------
-
- 7. Includes
- ===========
-
- You probably should get :
-
- - Standard AmigaDOS Includes for OS2.0 or higher
- - rtgmaster.library includes (available from me, MagicSN@birdland.es.bawue.de)
-
- I am listing the RtgScreenAMI structure out of rtgAMI.i here for better understanding
- (note : in the docs of rtgmaster.library it is stated, that this structure would be
- private to rtgmaster.library. It is private to rtgmaster.library *and* rtgmaster c2p
- now...)
-
- STRUCTURE RtgScreenAMI,0
- STRUCT rsAMI_Header,rs_SIZEOF
- UWORD rsAMI_Locks
- ALIGNLONG
- ULONG rsAMI_ScreenHandle
- ULONG rsAMI_PlaneSize
- ULONG rsAMI_DispBuf ;Buffer currently displayed
- ULONG rsAMI_ChipMem1
- ULONG rsAMI_ChipMem2
- ULONG rsAMI_ChipMem3
- STRUCT rsAMI_Bitmap1,40
- STRUCT rsAMI_Bitmap2,40
- STRUCT rsAMI_Bitmap3,40
- LABEL rsAMI_SIZEOF
-
- Now i am listing include:rtgmaster/rtgc2p.i :
-
- STRUCTURE c2p_Info,0
- WORD CI_ColorDepth ;CI_256, CI_128, CI_64, CI_EHB, CI_32..
- WORD CI_CPU ;CI_68060, CI_68040, CI_68030....
- WORD CI_Needs ;CI_Aikiko, CI_MMU, CI_FPU...
- UBYTE CI_PixelSize ;CI_1x1, CI_1x2, CI_2x1, CI_2x2...
- BOOL CI_Dirty ;TRUE/FALSE
- BOOL CI_Hack ;TRUE/FALSE
- BOOL CI_Asynchrone ;TRUE/FALSE
- WORD CI_WidthAlign ;Width has to be divisible by <number>
- WORD CI_HeightAlign ;Height has to be divisible by <number>
- WORD CI_Misc ;Different stuff...
- ULONG CI_AmiCompatible ;Is this compatible to RtgScreenAMI ?
- APTR CI_Description ;Pointer to a string
- APTR CI_Initialization ;Pointer to Initialization code
- APTR CI_Expunge ;Pointer to Expunge code
- APTR CI_Normal_c2p ;Pointer to c2p code
- APTR CI_Normal_c2p_InterL ;Pointer to Interleaved c2p
- APTR CI_Scrambled_c2p ;Pointer to Scrambled c2p
- APTR CI_Scrambled_c2p_InterL ;Pointer to Scrambled Interleaved c2p
- LABEL CI_SIZEOF
-
-
- ; CI_ColorDepth
-
- CI_256 EQU 256
- CI_128 EQU 128
- CI_64 EQU 64
- CI_EHB EQU 32
- CI_32 EQU 16
- CI_16 EQU 8
- CI_8 EQU 4
- CI_4 EQU 2
- CI_2 EQU 1
-
- ; CI_CPU
-
- CI_68060 EQU 1
- CI_68040 EQU 2
- CI_68030 EQU 4
- CI_68020 EQU 8
- CI_68060D EQU 16
- CI_68040D EQU 32
- CI_68030D EQU 64
- CI_68020D EQU 128
-
- ; CI_Needs
-
- CI_68060N EQU 1
- CI_68040N EQU 2
- CI_68030N EQU 4
- CI_Aikiko EQU 8
- CI_MMU EQU 16
- CI_FPU EQU 32
-
- ; CI_Misc
-
- CI_Smaller EQU 1
-
- ----------------------------------------------------------------------------------------------
-
- 8. A word from the Authors
- ==========================
-
- This rtgmaster c2p format was mainly done by me, Steffen Haeuser,
- with the help of Ludvig Pedersen and Peter McGavin. rtgmaster.library
- was/is done by me, John Hendrikx, Wolfram Schenk and Hans-Joerg Frieden.
- CallRtgC2P is supported by rtgmaster sublibraries starting with version
- number 2.0. Up to now no c2p functions are finished, so send me some :)
-
-
-
-